import { useMutation } from "@tanstack/react-query";
import { request } from "../api/request";
import { CHANGEPWD_URL, UPLOADINFO_URL } from "../constants/url";
const ChangePwdFn = async (param) => {
  //

  const { data } = await request(
    {
      url: CHANGEPWD_URL,
      method: "post",
      data: param,
      headers: {
        "Content-Type": "application/x-www-form-urlencoded",
      },
    },
    true
  );
  return {
    data,
  };
};

export default function useChangePwd() {
  //
  return useMutation(["changePwd"], ChangePwdFn);
}
